package com.controller;

//import com.model.Dokumen;
import com.model.Dokumen;
import java.awt.Font;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;

public class PanelLihatDaftarDokumen extends JPanel{

    private JTable tableDaftar;
    private JLabel labelPanel;
    private ArrayList<Dokumen> data;
    private JTable tableAnggota;
    private String awal,akhir;

    public PanelLihatDaftarDokumen(String a,String b) throws SQLException {
        awal= a;
        akhir= b;
        setLayout(null);
        labelPanel = new JLabel("Form lihat daftar ");
        labelPanel.setFont(new Font("Gothic", 2, 20));
        labelPanel.setBounds(300, 30, 300, 35);
        data = PengendaliPenerimaSuratDokumen.bacaTabelDaftarDokumen(a,b);
        tableDaftar = new JTable();
        tableDaftar.setBounds(30, 100, 900, 250);
        tableDaftar.setModel(new DaftartableModelDokumen(data));
        tableDaftar.setVisible(true);
        this.add(tableDaftar);
        this.add(labelPanel);
    }
}
